/*
 *	鸡兔同笼
 *	100个腿,40的头,求鸡和兔子个数
 */

#include<stdio.h>

int main () {
	int chick = 0;
	int rabbit = 0;
	for (chick = 0; chick <= 40; chick++) {
		rabbit = 40 - chick;
		if (chick * 2 + rabbit * 4 == 100) {
			printf("鸡有%d个,兔子有%d个\n", chick, rabbit);
		}
	}
	return 0;
}
